# -*- coding:utf-8 -*-
import requests


def get_headers():
    # 发送登录接口请求
    resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                         json={"mobile": "13800000002", "password": "123456"})
    # 获取token
    ihrm_token = f"Bearer {resp.json().get('data')}"
    # 组装headers
    headers = {"Authorization": ihrm_token}
    return headers


if __name__ == '__main__':
    print(get_headers())
